import gradio as gr

def echo(name, request: gr.Request):
    if request:
        print("Request headers dictionary:", request.headers)
        print("IP address:", request.client.host)
    return name + '!'

io = gr.Interface(echo, "textbox", "textbox").launch(server_name='0.0.0.0', server_port=7776, share=True)
